﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace EEM.MyControls
{
    public partial class AsideItem : UserControl
    {
        public AsideItem()
        {
            InitializeComponent();
        }


        private void AsideItem_Load(object sender, EventArgs e)
        {
        }

        public string Title
        {
            get { return labTitle.Text; }
            set
            {
                labTitle.Text = value;
            }
        }

        private bool state = false;
        public bool State
        {
            get { return state; }
            set
            {
                state = value;
                if (state)
                {
                    labState.Text = "在线";
                    light.LampColor[0] = Color.FromArgb(0, 108, 0);
                }
                else
                {
                    labState.Text = "离线";
                    light.LampColor[0] = Color.FromArgb(125, 130, 122);
                }
            }
        }
    }
}
